package com.zy.controller;

import com.zy.bean.TPermission;
import com.zy.service.TPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @Author: zy 690748807@qq.com
 * @Description: TODO
 * @Date: 2023/12/24 21:33
 * @Version: 1.0
 * @name 方法名字：权限操作
 */
@Controller
public class TPermissionController {
    @Autowired
    TPermissionService tPermissionService;

 /**
 *@Author: zy 690748807@qq.com
 * @Param:
 * @return:
 * @Date: 2023/12/24
 * @Description: 跳转到权限管理页面
 */
    @RequestMapping("/permission/index")
    public String index() {

        return "/permission/index";
    }
 /**
 *@Author: zy 690748807@qq.com
 * @Param:
 * @return:
 * @Date: 2024/1/11
 * @Description: 权限列表1111
 */
    @RequestMapping("/permission/listAllPermissionTree")
    @ResponseBody
    public List<TPermission> listAllPermissionTree() {
        List<TPermission> list = tPermissionService.listAllPermissionTree();
        return list;
    }
}
